﻿<%@ Page Title="Manage Roles" Language="C#" MasterPageFile="~/Views/Shared/OneCol.Master" AutoEventWireup="true" CodeBehind="Teams.aspx.cs" Inherits="StarterKits.Mvc.Membership.Views.FormsAuthenticationAdministration.Teams" %>
<asp:Content ID="content" ContentPlaceHolderID="Col1" runat="server">


<h2>Teams</h2>
<fieldset class="MvcMembership">
    <% if( ViewData.Model.Count > 0 ){ %>
	<% foreach( string team in ViewData.Model ){ %>
	<div><% =Html.ActionLink<P.InOut.NetMvc.Controllers.FormsAuthenticationAdministrationController>( x=> x.Team(team), team ) %> 
	    (<% =Html.ActionLink<P.InOut.NetMvc.Controllers.FormsAuthenticationAdministrationController>(x => x.DeleteTeam(team), 
	         "Delete", new { onclick = "return confirm('Are you sure you want to delete " + team + "')" })%>)</div>
	<% } %>
	<% }else{ %>
	<div>No teams have been added to the system yet.</div>
	<% } %>
</fieldset>

<% using( Html.Form( "FormsAuthenticationAdministration", "CreateTeam" ) ){ %>
<fieldset class="MvcMembership">
	<legend>Add Team</legend>

	<div>
	<label for="teamName">Team</label>
	<% =Html.TextBox( "teamName", new { size = 32, maxlength = 32}) %>
	</div>

	<div><% =Html.SubmitButton( "Add Team" ) %></div>

</fieldset>
<% } %>

</asp:Content>
